package com.modern.js.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.modern.js.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.modern.js.pojo.AssistPojo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author PIGS
 * @since 2020-03-23
 */
@Repository
public interface RoleMapper extends BaseMapper<Role> {

    List<AssistPojo> roleById(Integer roleId);

    IPage<AssistPojo> selectAll(Page<AssistPojo> page,String deptName,String roleName);

    List<AssistPojo> selectRoleDept(Integer deptId);

    int addRoleDept(AssistPojo assistPojo);

    int updateRoleDept(AssistPojo assistPojo);

    int deleteRoleDept(AssistPojo assistPojo);
}
